package me.zhengjie.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Set;

/**
 * @Description TODO
 * @Author Long
 * @Date 2021/8/12 14:31
 */
@Data
@TableName("kw_general_exam")
@Accessors(chain = true)
@ApiModel(description = "总考试实体类")
public class GeneralExam {

    @ApiModelProperty("主键id")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("总考试名")
    private String name;

    @ApiModelProperty("开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty("结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty("考次(201（代表2020年1学期以此类推）一共十年)")
    private Integer generalExamNumber;

    @ApiModelProperty("总考试汇总监考教师人数")
    @TableField(exist = false)
    private Integer examTearchers;

    @ApiModelProperty("总考试汇总学生人数")
    @TableField(exist = false)
    private Integer examStudents;

    @ApiModelProperty("本考试总场次数")
    @TableField(exist = false)
    private Integer exams;

    @ApiModelProperty("用户ID")
    @TableField(exist = false)
    private Set<Long> userIds;


    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
